package com.ruoyi.common.im.configuration;

import io.rong.RongCloud;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author jzy
 * @date 2021/11/13
 */
@Configuration
@ConfigurationProperties(prefix = "im.rongyun")
@Data
public class Config {

    private String appKey;
    private String appSecret;

    @Bean
    public RongCloud rongCloud() {
        RongCloud rongCloud = RongCloud.getInstance(appKey, appSecret);
        return rongCloud;
    }

}
